// Slimmed down from:
// use <UB.scad/libraries/ub.scad>
// Rund(.5) Voronoi(30,dicke=1);

offset(delta = 0.5)
  offset(r = 0.5, $fa = 12, $fs = 0.3)
    offset(delta = -0.5)
    group() {
      render() intersection() {
        square(size = [30, 30], center = false);
        offset(r = -0.5) {
            difference() {
              multmatrix([[1, 0, 0, 1.05379], [0, 1, 0, 17.962], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                circle($fn = 6, $fa = 12, $fs = 0.3, r = 19.4147);
              }
                multmatrix([[1, 0, 0, -6.97311], [0, 1, 0, 17.962], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[0, -1, 0, 0], [1, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                      square(size = [60, 60], center = false);
                    }
                  }
                }
                multmatrix([[1, 0, 0, 1.37103], [0, 1, 0, 23.4212], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[0.998316, 0.0580155, 0, 0], [-0.0580155, 0.998316, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                      square(size = [60, 60], center = false);
                    }
                  }
                }
                multmatrix([[1, 0, 0, 8.5793], [0, 1, 0, 12.2679], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[-0.603387, 0.797448, 0, 0], [-0.797448, -0.603387, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                      square(size = [60, 60], center = false);
                    }
                  }
                }
                multmatrix([[1, 0, 0, 9.31146], [0, 1, 0, 19.5957], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[0.194072, 0.980987, 0, 0], [-0.980987, 0.194072, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                      square(size = [60, 60], center = false);
                    }
                  }
                }
              }
        }
      }
      render() intersection() {
        square(size = [30, 30], center = false);
        offset(r = -0.5, $fn = 0, $fa = 12, $fs = 0.3) {
            difference() {
              multmatrix([[1, 0, 0, 1.68828], [0, 1, 0, 28.8803], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                circle($fn = 6, $fa = 12, $fs = 0.3, r = 23.2022);
              }
              multmatrix([[1, 0, 0, 1.37103], [0, 1, 0, 23.4212], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                multmatrix([[-0.998316, -0.0580155, 0, 0], [0.0580155, -0.998316, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    square(size = [60, 60], center = false);
                  }
                }
              }
              multmatrix([[1, 0, 0, 6.23602], [0, 1, 0, 36.9401], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                multmatrix([[0.870925, 0.491415, 0, 0], [-0.491415, 0.870925, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                  multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    square(size = [60, 60], center = false);
                  }
                }
              }
            }
        }
      }
    }
